home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / dvitovdu32 / src / pascal / vdu.h < prev    next >
Text File  |  1991-11-10  |  4KB  |  76 lines

  1. (* VDU implements the screen-driving routines used by DVItoVDU.
  2.    InitVDU initializes the parameters for the VDU screen.
  3.    After starting up, DVItoVDU breaks the screen into 2 parts:
  4.  
  5.    1. The DIALOGUE REGION will consist of the top 4 text lines on the screen.
  6.       This region is used to display DVI and window status information,
  7.       various kinds of messages and the command prompt.  DVItoVDU assumes
  8.       text lines on the screen start at 1 and increase downwards.  The bottom
  9.       text line on the screen is given by the parameter bottoml (also the total
  10.       number of text lines).
  11.  
  12.    2. The WINDOW REGION is typically the remaining area of the screen and
  13.       is used to display some sort of representation of the current DVI page.
  14.       The user can move the window over any part of the current page,
  15.       or even completely outside the page edges (but only just).
  16.       The user can scale the page display by changing the width and height of
  17.       the window region; windowwd and windowht are the initial, unscaled
  18.       dimensions where one paper pixel equals one screen pixel.
  19.       When addressing screen pixels, DVItoVDU assumes the top left pixel
  20.       in the screen is at (0,0); horizontal coordinates increase to the right
  21.       and vertical coordinates increase down the screen.  The top left pixel
  22.       in the window region is at (windowh,windowv) in this coordinate scheme.
  23.  
  24.    The following diagram illustrates the screen coordinate system used by
  25.    DVItoVDU and shows what the VDU parameters refer to.
  26.  
  27.                 --> h increases to the right
  28.    h,v=(0,0) *------------------------------------------------
  29.              |                               DVIstatusl      | top text line = 1
  30.        |     |              DIALOGUE REGION  windowstatusl   | (lines increase
  31.        V     |                               messagel        |  downwards)
  32.              |                               commandl        |
  33.        v     * (windowh,windowv) ----------------------------|   ---
  34.    increases |                                               |    |
  35.      down    |                                               |    |
  36.              |                                               |    |
  37.              |                                               |    |
  38.              |                WINDOW REGION                  | windowht
  39.              |     contains windowwd * windowht pixels       |    |
  40.              |                                               |    |
  41.              |                                               |    |
  42.              |                               bottoml         |    |
  43.              -------------------------------------------------   ---
  44.  
  45.              |------------------ windowwd -------------------|
  46.  
  47. *)
  48.  
  49. VAR
  50.    DVIstatusl,      (* DVI status line                                     *)
  51.    windowstatusl,   (* window status line                                  *)
  52.    messagel,        (* message line                                        *)
  53.    commandl,        (* command line                                        *)
  54.    bottoml,         (* bottom line; also number of text lines in screen    *)
  55.    windowh,         (* horizontal coord for window's top left screen pixel *)
  56.    windowv,         (* vertical coord for window's top left screen pixel   *)
  57.    windowwd,        (* width of window in screen pixels                    *)
  58.    windowht         (* height of window in screen pixels                   *)
  59.       : INTEGER;
  60.  
  61. PROCEDURE InitVDU;                                  EXTERNAL;
  62. PROCEDURE StartText;                                EXTERNAL;
  63. PROCEDURE MoveToTextLine (line : INTEGER);          EXTERNAL;
  64. PROCEDURE ClearTextLine  (line : INTEGER);          EXTERNAL;
  65. PROCEDURE ClearScreen;                              EXTERNAL;
  66. PROCEDURE StartGraphics;                            EXTERNAL;
  67. PROCEDURE LoadFont (fontname : string;
  68.                     fontsize : INTEGER;
  69.                     mag, hscale, vscale : REAL);    EXTERNAL;
  70. PROCEDURE ShowChar (screenh, screenv : INTEGER;
  71.                     ch : CHAR);                     EXTERNAL;
  72. PROCEDURE ShowRectangle (screenh, screenv,
  73.                          width, height : INTEGER;
  74.                          ch : CHAR);                EXTERNAL;
  75. PROCEDURE ResetVDU;                                 EXTERNAL;
  76.